<script>
/*
Sorts the references alphabetically.
Modified from code by Yvonne Aburrow.
*/
$(function(){
    var elems = $('#refs').children('div').remove();
    elems.sort(function (a, b) {
        return $(b).children('p').html().toUpperCase() > $(a).children('p').html().toUpperCase() ? -1 : 1;
    });
    $('#refs').append(elems);
})
</script>